﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Diagnostics;
using System.Xml;
using System.IO;
using System.ServiceModel.Channels;
using System.Runtime.Serialization.Json;
using System.ServiceModel;
using System.Reflection;
using System.Threading;

namespace Spike.ServiceFramework.ServiceModel.Registration
{
    public abstract class RegistrationBehavior : ConfigurationElement
    {
        protected const string HEADER_NAMESPACE = "urn:spike.serviceframework.servicemodel:20120524";
        protected const string HEADER_APPLICATION = "ClientApplication";        

        private TraceSource _ts;

        private TraceSource Trace
        {
            get { return _ts ?? (_ts = new TraceSource(TraceSource)); }
        }

        [ConfigurationProperty("traceSource", DefaultValue = "Spike.ServiceFramework.ServiceModel.Registration", IsRequired = false)]
        public string TraceSource
        {
            get { return (string)base["traceSource"]; }
            set { base["traceSource"] = value; }
        }
    }
}
